//
//  UIView+MDRExtension.m
//
//  Created by  on 16/1/8.
//  Copyright © 2016年 李忠. All rights reserved.
//

#import "UIView+SDExtension.h"

@implementation UIView (SDExtension)


-(CGPoint)sdOrigin{
    return self.frame.origin;
}
- (void)setSdOrigin:(CGPoint)sdOrigin{
    CGRect frame = self.frame;
    frame.origin = sdOrigin;
    self.frame = frame;
}

- (CGSize)sdSize{
    return  self.frame.size;
}
- (void)setSdSize:(CGSize)sdSize{
    CGRect frame = self.frame;
    frame.size = sdSize;
    self.frame = frame;
}

- (CGFloat)sdX {
    return self.frame.origin.x;
}
- (void)setSdX:(CGFloat)sdX {
    CGRect frame = self.frame;
    frame.origin.x = sdX;
    self.frame = frame;
}

- (CGFloat)sdY {
    return self.frame.origin.y;
}
- (void)setSdY:(CGFloat)sdY {
    CGRect frame = self.frame;
    frame.origin.y = sdY;
    self.frame = frame;
}

- (CGFloat)sdWidth {
    return self.frame.size.width;
}
- (void)setSdWidth:(CGFloat)sdWidth {
    CGRect frame = self.frame;
    frame.size.width = sdWidth;
    self.frame = frame;
}

- (CGFloat)sdHeight {
    return self.frame.size.height;
}
- (void)setSdHeight:(CGFloat)sdHeight {
    CGRect frame = self.frame;
    frame.size.height = sdHeight;
    self.frame = frame;
}












@end
